//
//  YDYUserAccount.h
//  DY_Weibo3
//
//  Created by 杨德勇 on 2016/8/20.
//  Copyright © 2016年 杨德勇. All rights reserved.
//

#import <Foundation/Foundation.h>

@interface YDYUserAccount : NSObject<NSCoding>
/** token */
@property (nonatomic, copy) NSString *access_token;
/** expires_in */
@property (nonatomic, assign) NSInteger expires_in;
/** uid */
@property (nonatomic, copy) NSString *uid;
/** 真正过期的时间 */
@property (nonatomic, strong) NSDate *expires_date;
/** 用户头像地址（大） */
@property (nonatomic, copy) NSString *avatar_large;
/** 用户昵称 */
@property (nonatomic, copy) NSString *screen_name;

-(instancetype)initWithDictonary:(NSDictionary *)dict;
-(BOOL)saveUserAccount;
+(instancetype)loadUserAccount;
+(BOOL)isLogin;
-(void)loadUserInfoFinished:(void(^)(YDYUserAccount *account , NSError *error))finished;
+(instancetype)sharedAccount;
@end
